package com.yongcheon.sms_manager.utils;

import android.app.AlertDialog;
import android.content.Context;

import com.yongcheon.sms_manager.R;

/**
 * Created by yongcheon on 2014-12-05.
 */
public class DialogUtil {

    public static void showOnlyConfirmBtn(Context context, String title, String msg) {
        new AlertDialog.Builder(context)
                .setTitle(title)
                .setMessage(msg)
                .setPositiveButton(context.getResources().getString(R.string.confirm), null)
                .show();
    }

    public static void showSMSMsgDlg(Context context, String from, String datae, String msg){
        String body = context.getResources().getString(R.string.date)+" : "+datae + "\n\n" + msg + "\n";
        AlertDialog dialog =  new AlertDialog.Builder(context)
                .setTitle(from)
                .setMessage(body)
                .setPositiveButton(context.getResources().getString(R.string.confirm), null)
                .create();

        dialog.setCanceledOnTouchOutside(true);
        dialog.show();
    }

}